package com.huluobo.h3weekdemo.search

import androidx.lifecycle.MutableLiveData
import com.huluobo.h3weekdemo.base.BaseViewModel
import com.huluobo.h3weekdemo.main.NewBeanResult

/**
 *  Created by LC on 2023/11/1.
 */
class SearchViewModel : BaseViewModel() {
    val repo = SearchRepo()
    val success = MutableLiveData<NewBeanResult>()
    val failed = MutableLiveData<String>()

    fun searchNews(
        currentPage: Int,
        id: Int,
        pageSize: Int,
        keyword: String
    ) {
        repo.searchNews(currentPage, id, pageSize, keyword, success, failed)
    }
}